@model SecurityGuard.ViewModels.LogOnViewModel
@{
    ViewBag.Title = "LogOn";
}
<h2>
    Log On</h2>
<p>
    Please enter your user name and password. @Html.ActionLink("Register", "Register")
    if you don't have an account.
</p>
<script src="@Url.Content("~/Content/SecurityGuard/scripts/jquery-1.6.1.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Content/SecurityGuard/scripts/modernizr-1.7.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Content/SecurityGuard/scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Content/SecurityGuard/scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
@using (Html.BeginForm("LogOn", "SGAccount", new { returnUrl = Request.QueryString["ReturnUrl"] }))
{
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Log On Credentials</legend>
        <table>
            <tr>
                <td>
                    <div class="editor-label">
                        @Html.LabelFor(model => model.UserName)
                    </div>
                </td>
                <td>
                    <div class="editor-field">
                        @Html.EditorFor(model => model.UserName)
                        @Html.ValidationMessageFor(model => model.UserName)
                    </div>
                </td>
            </tr>
            <tr>
                <td>
                    <div class="editor-label">
                        @Html.LabelFor(model => model.Password)
                    </div>
                </td>
                <td>
                    <div class="editor-field">
                        @Html.EditorFor(model => model.Password)
                        @Html.ValidationMessageFor(model => model.Password)
                    </div>
                </td>
            </tr>
            <tr>
                <td>
                    <div class="editor-label">
                        @Html.LabelFor(model => model.RememberMe)
                    </div>
                </td>
            </tr>
        </table>
        <div class="editor-field">
            @Html.EditorFor(model => model.RememberMe)
            @Html.ValidationMessageFor(model => model.RememberMe)
        </div>
        <p>
            <input type="submit" value="Log On" />
        </p>
        @if (Model.EnablePasswordReset)
        {
            <p>@Html.ActionLink("Forgot Password?", "ForgotPassword")</p>
        }
    </fieldset>
}


<script type="text/javascript">
    $(function () {
        $("#UserName").focus();
    });
</script>